package leetcode

/*
 * @lc app=leetcode.cn id=674 lang=golang
 *
 * [674] 最长连续递增序列
 */

// @lc code=start
func findLengthOfLCIS(nums []int) int {
	maxLen := 0
	tmpLen := 1
	n := len(nums)
	for i := 0; i < n; i++ {
		if i == n-1 {
			if tmpLen > maxLen {
				maxLen = tmpLen
				tmpLen = 1
			}
		} else if nums[i] < nums[i+1] {
			tmpLen++
		} else {
			if tmpLen > maxLen {
				maxLen = tmpLen
			}
			tmpLen = 1
		}
	}
	return maxLen
}

// @lc code=end
